Skip to content

Conversation

@Vignesh-SF3580
Copy link
Contributor

@Vignesh-SF3580 Vignesh-SF3580 commented Feb 3, 2026

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Issue Details

When an invalid template name is provided, the app crashes on Android and iOS when relaunching the app.

Root Cause

Inconsistent exception handling in StaticResourceExtension - it returned null when an exception handler was present but threw an exception when debugger is not attached.

Description of Change

Modified StaticResourceExtension.cs and ApplyPropertiesVisitor.cs to always throw exceptions for invalid StaticResource references, regardless of whether an exception handler is present. Previously, the code returned null and allowing the app to continue. The fix ensures consistent behavior by creating the exception once, optionally logging it through the exception handler if available, and then always throwing it.

Tested the behavior in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Issues Fixed

Fixes #23903

Screenshots

iOS:

Before Issue Fix After Issue Fix
23903BeforeiOS.mov
23903AfteriOS.mov

Android:

Before Issue Fix After Issue Fix
23903AndroidBefore.mov
23903AndroidAfter.mov

@Vignesh-SF3580 Vignesh-SF3580 added the community ✨ Community Contribution label Feb 3, 2026
@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Feb 3, 2026
@Vignesh-SF3580 Vignesh-SF3580 changed the title [Android, iOS] Fix app relaunch crash caused by invalid StaticResource templates [Android, iOS] Throw exceptions consistently for invalid StaticResource references to prevent relaunch crashes Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opening a page with an undefined control template crashes on iOS only when not debugging

1 participant